#劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅
# 搤惎幃斈梡愴摤傾僯儊丒峌寕曇
#劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅
# 惢嶌      搤惎
# 嵟廔峏怴  2006/07/09
#劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅
# 價乕儉敪幩傾僯儊

愴摤傾僯儊_擇挌價乕儉儔僀僼儖峌寕:

Local i m T_X T_Y ANG W_P W_S B_C H_C S-I C-S S_E M_V ARY PrSE

Set T_X (WX(懳徾儐僯僢僩俬俢) + 16)
Set T_Y (WY(懳徾儐僯僢僩俬俢) + 16)
Set ANG Call(_GetAngle)

For i = 1 To ArgNum
  Array ARY Args(i) "="
  Switch ARY[1]
  Case 夋憸僼傽僀儖
    Set W_P[A] ARY[2]
    Set W_P[B] ARY[3]
  Case 夋憸僒僀僘
    Set W_S[A] ARY[2]
    Set W_S[B] ARY[3]
  Case 怓
    Set B_C[A] ARY[2]
    Set B_C[B] ARY[3]
  Case 埿椡
    Set B_S[A] ARY[2]
    Set B_S[B] ARY[3]
  Case Else
    If InStr(ARY[1], ".wav") > 0 Then
      Set PrSE ARY[1]
    EndIf
  EndSw
Next

Set W_P[1] _SelectAorB("Weapon\EFFECT_BeamRifle01.bmp",W_P[A],".bmp")
Set W_S[1] _SelectAorB(32,W_S[A])
Set B_C[1] ("\Bitmap\Anime\Beam\EFFECT_Beam" & _BeamColorSelect(B_C[A]) & "0")
Set W_P[2] _SelectAorB("Weapon\EFFECT_BeamRifle01.bmp",W_P[B],".bmp")
Set W_S[2] _SelectAorB(32,W_S[B])
Set B_C[2] ("\Bitmap\Anime\Beam\EFFECT_Beam" & _BeamColorSelect(B_C[B]) & "0")
Set S_E _SelectAorB(Beam.wav,PrSE,".wav")

#Set B_S[1] _SelectAorB(彫,B_S[A])
#Set B_S[2] _SelectAorB(彫,B_S[B])

Set H_C[1] (W_S[1] / 2)
Set H_C[2] (W_S[2] / 2)
# 廋惓抣偺寁嶼乧乧夋憸僒僀僘偺敿暘亖夋憸夞揮帪偺敿宎

Set S-I[A] (Sin(3.141592 * (ANG + 90) / 180) * 16)
Set C-S[A] (Cos(3.141592 * (ANG + 90) / 180) * 16)

# 晲婍夋憸偺昞帵埵抲廋惓抣
# 儐僯僢僩夋憸傪敿宎16偺墌偲壖掕偟丄偦傟偧傟僒僀儞偲僐僒僀儞傪媮傔傑偡丅
#
# 晲婍偺夋憸偼丄懳徾儐僯僢僩乣憡庤儐僯僢僩娫偺捈慄偵懳偟偰丄
# 昁偢悅捈偺埵抲偵昞帵偝傟傑偡丅
# 偟偨偑偭偰丄偡偱偵媮傔偨妏搙ANG偵90傪懌偟偰寁嶼丅

Set S-I[1] (Sin(3.141592 * ANG / 180) * H_C[1])
Set S-I[2] (Sin(3.141592 * ANG / 180) * H_C[2])
Set C-S[1] (Cos(3.141592 * ANG / 180) * H_C[1])
Set C-S[2] (Cos(3.141592 * ANG / 180) * H_C[2])

# 夋憸偺敿宎偵偦傟偧傟偺妏搙偺僒僀儞丒僐僒僀儞傪偐偗傞
#               亖夋憸夞揮帪偺朇岥偺埵抲傪抦傞偨傔偺廋惓抣
# 揋婡偑帺婡偺忋壓嵍塃偵偄傞応崌乧乧偮傑傝丄夞揮妏偑90搙偢偮偱偁傞応崌偵偼
# 晄梫偱偡偑丄柺搢側偺偱愭偵寁嶼偝偣偰偄傑偡丅

Set M_V[X] _DirectionChecker(倃)
Set M_V[Y] _DirectionChecker(倄)

# 伀偙偙偐傜夋憸偺昞帵

If ANG > 0 And ANG < 180 Then
  Wait Start
  PlaySound Charge.wav
  For i = 1 To 5
    ClearPicture
    Switch i
    Case 3
      PlaySound S_E
      Set m 2
    Case 4
      Set m 1
    Case Else
      Set m 0
    EndSw
    PaintPicture W_P[1] (T_X - H_C[1] + C-S[A] + (M_V[X] * m)) (T_Y - H_C[1] + S-I[A] + (M_V[Y] * m)) W_S[1] W_S[1] 摟夁 _L-RChecker() 塃夞揮 ANG _ColorTime()
    PaintPicture W_P[2] (T_X - H_C[2] - C-S[A] + (M_V[X] * m)) (T_Y - H_C[2] - S-I[A] + (M_V[Y] * m)) W_S[2] W_S[2] 摟夁 _L-RChecker() 塃夞揮 ANG _ColorTime()
    PaintPicture (AppPath & B_C[1] & i & ".bmp") (T_X - 32 + C-S[A] - C-S[1]) (T_Y - 32 + S-I[A] - S-I[1]) 64 64 摟夁 塃夞揮 ANG _ColorTime(1)
    PaintPicture (AppPath & B_C[2] & i & ".bmp") (T_X - 32 - C-S[A] - C-S[2]) (T_Y - 32 - S-I[A] - S-I[2]) 64 64 摟夁 塃夞揮 ANG _ColorTime(1)
    Refresh
    Wait Until (0.8 * i)
  Next
Else
  Wait Start
  PlaySound Charge.wav
  For i = 1 To 5
    ClearPicture
    Switch i
    Case 3
      PlaySound S_E
      Set m 2
    Case 4
      Set m 1
    Case Else
      Set m 0
    EndSw
    PaintPicture W_P[1] (T_X - H_C[1] - C-S[A] + (M_V[X] * m)) (T_Y - H_C[1] - S-I[A] + (M_V[Y] * m)) W_S[1] W_S[1] 摟夁 _L-RChecker() 塃夞揮 ANG _ColorTime()
    PaintPicture W_P[2] (T_X - H_C[2] + C-S[A] + (M_V[X] * m)) (T_Y - H_C[2] + S-I[A] + (M_V[Y] * m)) W_S[2] W_S[2] 摟夁 _L-RChecker() 塃夞揮 ANG _ColorTime()
    PaintPicture (AppPath & B_C[1] & i & ".bmp") (T_X - 32 - C-S[A] - C-S[1]) (T_Y - 32 - S-I[A] - S-I[1]) 64 64 摟夁 塃夞揮 ANG _ColorTime(1)
    PaintPicture (AppPath & B_C[2] & i & ".bmp") (T_X - 32 + C-S[A] - C-S[2]) (T_Y - 32 + S-I[A] - S-I[2]) 64 64 摟夁 塃夞揮 ANG _ColorTime(1)
    Refresh
    If i = 3 Then
      PlaySound S_E
    EndIf
    Wait Until (0.8 * i)
  Next
EndIf

UnSet i m T_X T_Y ANG W_P W_S B_C H_C S-I C-S S_E M_V ARY PrSE
Return

愴摤傾僯儊_擇挌價乕儉儔儞僠儍乕峌寕:

Local i m T_X T_Y ANG W_P W_S B_C H_C S-I C-S S_E M_V ARY PrSE

Set T_X (WX(懳徾儐僯僢僩俬俢) + 16)
Set T_Y (WY(懳徾儐僯僢僩俬俢) + 16)
Set ANG Call(_GetAngle)

For i = 1 To ArgNum
  Array ARY Args(i) "="
  Switch ARY[1]
  Case 夋憸僼傽僀儖
    Set W_P[A] ARY[2]
    Set W_P[B] ARY[3]
  Case 夋憸僒僀僘
    Set W_S[A] ARY[2]
    Set W_S[B] ARY[3]
  Case 怓
    Set B_C[A] ARY[2]
    Set B_C[B] ARY[3]
  Case 埿椡
    Set B_S[A] ARY[2]
    Set B_S[B] ARY[3]
  Case Else
    If InStr(ARY[1], ".wav") > 0 Then
      Set PrSE ARY[1]
    EndIf
  EndSw
Next

Set W_P[1] _SelectAorB("Weapon\EFFECT_MBeamRifle01.bmp",W_P[A],".bmp")
Set W_S[1] _SelectAorB(32,W_S[A])
Set B_C[1] ("\Bitmap\Anime\Beam\EFFECT_MBeam" & _BeamColorSelect(B_C[A]) & "0")
Set W_P[2] _SelectAorB("Weapon\EFFECT_MBeamRifle01.bmp",W_P[B],".bmp")
Set W_S[2] _SelectAorB(32,W_S[B])
Set B_C[2] ("\Bitmap\Anime\Beam\EFFECT_MBeam" & _BeamColorSelect(B_C[B]) & "0")
Set S_E _SelectAorB(Beam.wav,PrSE,".wav")

#Set B_S[1] _SelectAorB(彫,B_S[A])
#Set B_S[2] _SelectAorB(彫,B_S[B])

Set H_C[1] (W_S[1] / 2)
Set H_C[2] (W_S[2] / 2)

Set S-I[A] (Sin(3.141592 * (ANG + 90) / 180) * 16)
Set C-S[A] (Cos(3.141592 * (ANG + 90) / 180) * 16)

# 晲婍夋憸偺昞帵埵抲廋惓抣
# 儐僯僢僩夋憸傪敿宎16偺墌偲壖掕偟丄偦傟偧傟僒僀儞偲僐僒僀儞傪媮傔傑偡丅
#
# 晲婍偺夋憸偼丄懳徾儐僯僢僩乣憡庤儐僯僢僩娫偺捈慄偵懳偟偰丄
# 昁偢悅捈偺埵抲偵昞帵偝傟傑偡丅
# 偟偨偑偭偰丄偡偱偵媮傔偨妏搙ANG偵90傪懌偟偰寁嶼丅

Set S-I[1] (Sin(3.141592 * ANG / 180) * H_C[1])
Set S-I[2] (Sin(3.141592 * ANG / 180) * H_C[2])
Set C-S[1] (Cos(3.141592 * ANG / 180) * H_C[1])
Set C-S[2] (Cos(3.141592 * ANG / 180) * H_C[2])

Set M_V[X] _DirectionChecker(倃)
Set M_V[Y] _DirectionChecker(倄)

# 伀偙偙偐傜夋憸偺昞帵

If ANG > 0 And ANG < 180 Then
  Wait Start
  PlaySound Charge.wav
  For i = 1 To 5
    ClearPicture
    Switch i
    Case 3
      PlaySound S_E
      Set m 2
    Case 4
      Set m 1
    Case Else
      Set m 0
    EndSw
    PaintPicture W_P[1] (T_X - H_C[1] + C-S[A] + (M_V[X] * m)) (T_Y - H_C[1] + S-I[A] + (M_V[Y] * m)) W_S[1] W_S[1] 摟夁 _L-RChecker() 塃夞揮 ANG _ColorTime()
    PaintPicture W_P[2] (T_X - H_C[2] - C-S[A] + (M_V[X] * m)) (T_Y - H_C[2] - S-I[A] + (M_V[Y] * m)) W_S[2] W_S[2] 摟夁 _L-RChecker() 塃夞揮 ANG _ColorTime()
    PaintPicture (AppPath & B_C[1] & i & ".bmp") (T_X - 32 + C-S[A] - C-S[1]) (T_Y - 32 + S-I[A] - S-I[1]) 64 64 摟夁 塃夞揮 ANG _ColorTime(1)
    PaintPicture (AppPath & B_C[2] & i & ".bmp") (T_X - 32 - C-S[A] - C-S[2]) (T_Y - 32 - S-I[A] - S-I[2]) 64 64 摟夁 塃夞揮 ANG _ColorTime(1)
    Refresh
    Wait Until (0.8 * i)
  Next
Else
  Wait Start
  PlaySound Charge.wav
  For i = 1 To 5
    ClearPicture
    Switch i
    Case 3
      PlaySound S_E
      Set m 2
    Case 4
      Set m 1
    Case Else
      Set m 0
    EndSw
    PaintPicture W_P[1] (T_X - H_C[1] - C-S[A] + (M_V[X] * m)) (T_Y - H_C[1] - S-I[A] + (M_V[Y] * m)) W_S[1] W_S[1] 摟夁 _L-RChecker() 塃夞揮 ANG _ColorTime()
    PaintPicture W_P[2] (T_X - H_C[2] + C-S[A] + (M_V[X] * m)) (T_Y - H_C[2] + S-I[A] + (M_V[Y] * m)) W_S[2] W_S[2] 摟夁 _L-RChecker() 塃夞揮 ANG _ColorTime()
    PaintPicture (AppPath & B_C[1] & i & ".bmp") (T_X - 32 - C-S[A] - C-S[1]) (T_Y - 32 - S-I[A] - S-I[1]) 64 64 摟夁 塃夞揮 ANG _ColorTime(1)
    PaintPicture (AppPath & B_C[2] & i & ".bmp") (T_X - 32 + C-S[A] - C-S[2]) (T_Y - 32 + S-I[A] - S-I[2]) 64 64 摟夁 塃夞揮 ANG _ColorTime(1)
    Refresh
    If i = 3 Then
      PlaySound S_E
    EndIf
    Wait Until (0.8 * i)
  Next
EndIf

UnSet i m T_X T_Y ANG W_P W_S B_C H_C S-I C-S S_E M_V ARY PrSE
Return
